<?php

/**
 * Prof form base class.
 *
 * @package    FinalsClub
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseProfForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                                     => new sfWidgetFormInputHidden(),
      'user_id'                                => new sfWidgetFormPropelChoice(array('model' => 'User', 'add_empty' => false)),
      'course_material_external_comment'       => new sfWidgetFormInput(),
      'course_material_external_visibility'    => new sfWidgetFormInputCheckbox(),
      'copyright_material_external_visibility' => new sfWidgetFormInputCheckbox(),
      'audio_recording'                        => new sfWidgetFormInputCheckbox(),
      'audio_share'                            => new sfWidgetFormInput(),
      'copyright'                              => new sfWidgetFormInput(),
      'copyright_link'                         => new sfWidgetFormInput(),
      'updated_at'                             => new sfWidgetFormDateTime(),
      'created_at'                             => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                                     => new sfValidatorPropelChoice(array('model' => 'Prof', 'column' => 'id', 'required' => false)),
      'user_id'                                => new sfValidatorPropelChoice(array('model' => 'User', 'column' => 'id')),
      'course_material_external_comment'       => new sfValidatorInteger(),
      'course_material_external_visibility'    => new sfValidatorBoolean(),
      'copyright_material_external_visibility' => new sfValidatorBoolean(),
      'audio_recording'                        => new sfValidatorBoolean(),
      'audio_share'                            => new sfValidatorInteger(),
      'copyright'                              => new sfValidatorInteger(),
      'copyright_link'                         => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'updated_at'                             => new sfValidatorDateTime(array('required' => false)),
      'created_at'                             => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('prof[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Prof';
  }


}
